<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mytable/mytable/Bai_event.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/mytable/mytable/Bai_event.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'uuid',
                footer: "Foots",
                cnName: 'AI触发事件',
                name: 'mytable/Bai_event',
                url: "/Bai_event/",
                sortName: "eventId"
            });
            const editFormFields = ref({"eventId":"","title":"","skillId":"","deviceToken":"","deviceName":"","renderImageUrl":"","skillName":"","requestTime":"","createTime":"","savapicpath":"","savapicpath_y":""});
            const editFormOptions = ref([[{"title":"事件ID","field":"eventId"},
                               {"title":"事件标题","field":"title"},
                               {"title":"技能ID","field":"skillId","type":"number"}],
                              [{"title":"设备token","field":"deviceToken"},
                               {"title":"设备名称","field":"deviceName"},
                               {"title":"图片地址","field":"renderImageUrl"}],
                              [{"title":"技能名称","field":"skillName"},
                               {"title":"抓拍时间","field":"requestTime"},
                               {"title":"事件发生时间","field":"createTime"}],
                              [{"title":"图片本地地址","field":"savapicpath"},
                               {"title":"原始图片本地地址","field":"savapicpath_y"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'uuid',title:'uuid',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'eventId',title:'事件ID',type:'string',link:true,width:110,align:'left',sort:true},
                       {field:'title',title:'事件标题',type:'string',width:110,align:'left'},
                       {field:'skillId',title:'技能ID',type:'int',width:110,align:'left'},
                       {field:'deviceToken',title:'设备token',type:'string',width:110,align:'left'},
                       {field:'deviceName',title:'设备名称',type:'string',width:110,align:'left'},
                       {field:'renderImageUrl',title:'图片地址',type:'string',width:110,align:'left'},
                       {field:'skillName',title:'技能名称',type:'string',width:110,align:'left'},
                       {field:'requestTime',title:'抓拍时间',type:'datetime',width:110,align:'left',sort:true},
                       {field:'createTime',title:'事件发生时间',type:'datetime',width:110,align:'left',sort:true},
                       {field:'savapicpath',title:'图片本地地址',type:'string',width:220,align:'left'},
                       {field:'savapicpath_y',title:'原始图片本地地址',type:'string',width:220,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
